![]() |
PATH![]() |
![]() ![]() |
Obtains a measurement of the space surrounding a menu item.
pascal OSStatus GetThemeMenuItemExtra (
ThemeMenuItemType inItemType,
SInt16 *outHeight,
SInt16 *outWidth);
Your application should call the GetThemeMenuItemExtra function when you are writing your own menu definition function and wish to be theme-compliant. Once you have determined the height and width of the content of a menu item, call GetThemeMenuItemExtra to get a measurement in pixels of the space surrounding a menu item, including any necessary inter-item spacing, in the current theme. By combining the values for your menu item's content and the extra padding needed by the theme, you can derive the size of the rectangle needed to encompass both the content and the theme element together.